 /* 浙政钉环境监管移动端 - 通用样式 */

/* 基础样式重置 */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 状态栏样式 */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 24px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e5e7eb;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 0;
}

.nav-item:hover {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
}

.nav-item.active {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
}

.nav-item i {
    margin-bottom: 2px;
}

/* 主框架样式 */
#main-frame {
    margin-top: 24px;
    margin-bottom: 60px;
    display: block;
    width: 100%;
    height: calc(100vh - 140px) !important;
}

/* 政府应用色彩系统 */
:root {
    --primary-color: #2563eb;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* 卡片组件 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* 按钮组件 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background-color: var(--gray-50);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 输入框组件 */
.input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background-color: white;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 标签组件 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary { background-color: rgba(37, 99, 235, 0.1); color: var(--primary-color); }
.badge-success { background-color: rgba(5, 150, 105, 0.1); color: var(--success-color); }
.badge-warning { background-color: rgba(217, 119, 6, 0.1); color: var(--warning-color); }
.badge-danger { background-color: rgba(220, 38, 38, 0.1); color: var(--danger-color); }
.badge-info { background-color: rgba(8, 145, 178, 0.1); color: var(--info-color); }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* 水质等级颜色 */
.water-excellent { color: #2563eb; background-color: rgba(37, 99, 235, 0.1); }
.water-good { color: #059669; background-color: rgba(5, 150, 105, 0.1); }
.water-light { color: #d97706; background-color: rgba(217, 119, 6, 0.1); }
.water-moderate { color: #ea580c; background-color: rgba(234, 88, 12, 0.1); }
.water-heavy { color: #dc2626; background-color: rgba(220, 38, 38, 0.1); }

/* 空气质量等级颜色 */
.aqi-excellent { color: #059669; background-color: rgba(5, 150, 105, 0.1); }
.aqi-good { color: #84cc16; background-color: rgba(132, 204, 22, 0.1); }
.aqi-light { color: #eab308; background-color: rgba(234, 179, 8, 0.1); }
.aqi-moderate { color: #f97316; background-color: rgba(249, 115, 22, 0.1); }
.aqi-heavy { color: #dc2626; background-color: rgba(220, 38, 38, 0.1); }
.aqi-serious { color: #7c2d12; background-color: rgba(124, 45, 18, 0.1); }

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 375px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .nav-item span { font-size: 10px; }
    .card { padding: 12px; margin-bottom: 12px; }
}

/* 无障碍访问支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #111827;
        --gray-100: #1f2937;
        --gray-200: #374151;
        --gray-300: #4b5563;
        --gray-400: #6b7280;
        --gray-500: #9ca3af;
        --gray-600: #d1d5db;
        --gray-700: #e5e7eb;
        --gray-800: #f3f4f6;
        --gray-900: #f9fafb;
    }
}

/* 弹窗系统样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 20px 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 弹窗内容样式 */
.modal-search {
    margin-bottom: 16px;
}

.modal-search input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
}

.modal-list {
    max-height: 300px;
    overflow-y: auto;
}

.modal-list-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-list-item:hover {
    background-color: #f9fafb;
}

.modal-list-item:last-child {
    border-bottom: none;
}

/* 弹窗动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

/* 响应式弹窗 */
@media (max-width: 640px) {
    .modal-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}